import json
class base:
    def __str__(self):
        return json.dumps(self.__dict__)
    def setdict(self,c):
        for k in self.__dict__.keys():
            if k in c.keys():
                self.__dict__[k]=c[k]
    def update(self,c):
        self.__dict__.update(c)
    def get(self,k):
        return self.__dict__.get(k)
    def set(self,k,v):
        self.__dict__[k]=v